package deconstruction.common;


import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import cpw.mods.fml.common.network.IGuiHandler;
import deconstruction.deconTable.ContainerDeconstructionTable;
import deconstruction.deconTable.GuiDeconstruction;

public class GuiHandler implements IGuiHandler
{
	@Override
	public Object getServerGuiElement(int id, EntityPlayer player, World world, int x, int y, int z)
	{
		TileEntity tile_entity = world.getBlockTileEntity(x, y, z);

		switch(id)
		{
		case 1: return id == 1 && world.getBlockId(x, y, z) == mod_Deconstruction.deconstructionTable.blockID ? new ContainerDeconstructionTable(player.inventory, world, x, y, z) : null;
		}
		return null;
	}

	@Override
	public Object getClientGuiElement(int id, EntityPlayer player, World world, int x, int y, int z)
	{
		TileEntity tile_entity = world.getBlockTileEntity(x, y, z);
		switch(id)
		{
		case 1: return id == 1 && world.getBlockId(x, y, z) == mod_Deconstruction.deconstructionTable.blockID ? new GuiDeconstruction(player.inventory, world, x, y, z) : null;
		}
		return null;
	}
}